Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites list: Display only site icons as site thumbnails #90585

Merged
merged 2 commits into from
May 12, 2024

Conversation

mmtr
Copy link
Member

@mmtr mmtr commented May 10, 2024

Fixes https://github.com/Automattic/dotcom-forge/issues/7069

Proposed Changes

Removes the screenshots from the site thumbnails displayed in the sites list in favor of only displaying the site icon.

Before After
Screenshot 2024-05-10 at 16 25 26 Screenshot 2024-05-10 at 16 25 32

Testing Instructions

  • Use the Calypso live link below
  • Go to /sites
  • Make sure the site thumbnails only display the site icons now

@mmtr mmtr requested a review from a team May 10, 2024 14:36
@mmtr mmtr self-assigned this May 10, 2024
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 10, 2024
@matticbot
Copy link
Contributor

matticbot commented May 10, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~85 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper       +167 B  (+0.0%)      +85 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~585 bytes added 📈 [gzipped])

name                     parsed_size           gzip_size
a8c-for-agencies-sites        +773 B  (+0.1%)     +324 B  (+0.1%)
sites-dashboard               +471 B  (+0.1%)     +174 B  (+0.1%)
site-monitoring               +471 B  (+0.0%)     +174 B  (+0.1%)
hosting                       +471 B  (+0.0%)     +174 B  (+0.0%)
github-deployments            +471 B  (+0.0%)     +174 B  (+0.1%)
dev-tools-promo               +471 B  (+0.1%)     +174 B  (+0.1%)
reader                        +167 B  (+0.0%)      +87 B  (+0.0%)
home                          +167 B  (+0.0%)      +87 B  (+0.0%)
import-hosted-site-flow       -120 B  (-0.0%)      -59 B  (-0.0%)
import-flow                   -120 B  (-0.0%)      -59 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~166 bytes added 📈 [gzipped])

name                                                 parsed_size           gzip_size
async-load-design                                         +249 B  (+0.0%)      +79 B  (+0.0%)
async-load-design-blocks                                  +167 B  (+0.0%)      +87 B  (+0.0%)
async-load-calypso-components-web-preview-component       +167 B  (+0.0%)      +86 B  (+0.1%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/sites-list-icon on your sandbox.

Comment on lines +22 to +35
export function getFirstGrapheme( input: string ) {
if ( 'Segmenter' in Intl ) {
const segmenter = new Intl.Segmenter();
const [ firstSegmentData ] = segmenter.segment( input );

return firstSegmentData?.segment ?? '';
}

const codePoint = input.codePointAt( 0 );
if ( codePoint ) {
return String.fromCodePoint( codePoint );
}
return '';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice move!

Copy link
Contributor

@rcrdortiz rcrdortiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@taipeicoder taipeicoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this PR also get rids of all those mShots CORS errors so a big fan of this change!
Screenshot 2024-05-13 at 7 40 36 AM

@taipeicoder taipeicoder merged commit a53e4c3 into trunk May 12, 2024
11 checks passed
@taipeicoder taipeicoder deleted the update/sites-list-icon branch May 12, 2024 23:42
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 12, 2024
@roo2
Copy link
Contributor

roo2 commented May 13, 2024

TODO, this slightly conflicted with my pr #90420 so now we have too small icons on mobile. I'll look into it tomorrow.
Screenshot 2024-05-13 at 6 15 58 pm

EDIT: I can't seem to reproduce this now, maybe I just needed to restart my calypso?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants